package Lab4;

import java.util.*;


public class Employee {
	public String ma;
	public String ten;
	public String dc;
	public static Date ngayvaolam;
	public static Date ngaychotluong;
	public float luongcb;
	public double luong() {
		return (luongcb*daysBetween2Dates())/30; 
	}
	public static long daysBetween2Dates(){
		Calendar c1 = Calendar.getInstance(); //new GregorianCalendar();
		Calendar c2 = Calendar.getInstance(); //new GregorianCalendar();
		c1.setTime(ngayvaolam);	
		c2.setTime(ngaychotluong);
	//c1.set( 2008, 02, 20);

	//c2.set(2008, 02 , 22);


	return (c2.getTime().getTime() - c1.getTime().getTime())/(24*3600*1000);

	}
}

